package com.qy127.entity;

import java.io.Serializable;
import java.util.List;

/**
 * @ClassName Tree
 * @Description ToDo
 * @Auther teacher Bai
 * @Date 2020/12/26 1:39
 */
public class Tree implements Serializable {

    private Integer id;
    private String title;
    private boolean spread=true;
    private List<Tree> children;

    public Tree() {
    }

    public Tree(Integer id, String title, List<Tree> sonTree) {
        this.id = id;
        this.title = title;
        this.children = sonTree;
        this.spread=true;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<Tree> getChildren() {
        return children;
    }

    public void setChildren(List<Tree> children) {
        this.children = children;
    }

    public boolean getSpread() {
        return spread;
    }

    public void setSpread(boolean spread) {
        this.spread = spread;
    }

    @Override
    public String toString() {
        return "Tree{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", spread=" + spread +
                ", children=" + children +
                '}';
    }
}
